#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <error.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>


#define F "./uu.txt"

 int unlink(const char *pathname);

 int main(){
 	int fd=0;
 	fd=open(F,O_RDWR|O_CREAT,0644);
 	if(-1 == fd){
 		perror("open fail");
 	}
 	unlink(F);
 	write(fd,"php",3);
 	lseek(fd,0,SEEK_SET);
 	char buf[10]={0};
 	read(fd,buf,sizeof(buf));
 	printf("buf=%s\n",buf );

 	return 0;
 }